Conversation
ngrpv
commented
Feb 5, 2023
| private val cardRepository: CardsRepository = CardsDAO() | ||
| private val userRepository: UserLoginInfoRepository =UserLoginInfoDAO() | ||
| fun addCard(card: CardItem): Boolean { | ||
| transaction { Card.new { namee=card.namee;title=card.title;info=card.info;contact=card.contacts;image=card.image; } } |
Collaborator
Author
There was a problem hiding this comment.
Я бы переименовал info, непонятно что значит
| private val cardRepository: CardsRepository = CardsDAO() | ||
| private val userRepository: UserLoginInfoRepository =UserLoginInfoDAO() | ||
| fun addCard(card: CardItem): Boolean { | ||
| transaction { Card.new { namee=card.namee;title=card.title;info=card.info;contact=card.contacts;image=card.image; } } |
Collaborator
Author
There was a problem hiding this comment.
можно же тут вызывать add из CardRepository
|
|
||
|
|
||
| } | ||
| object cards : IntIdTable() { |
Collaborator
Author
There was a problem hiding this comment.
С большой буквы Cards
| routing { | ||
| authorizedRouting() | ||
| unauthorizedRouting() | ||
| cardsRouting() |
Collaborator
Author
There was a problem hiding this comment.
роутинг надо в один из двух пихать, либо в авторизованные, либо не в авторизованные, скорее в первое
|
|
||
| override fun getBunchOfCards(name: String)= transaction { cards | ||
| .select(cards.namee neq name) | ||
| .limit(10).let { Card.wrapRows(it) }.toList() } |
Collaborator
Author
There was a problem hiding this comment.
- кажется лучше лимит передавать через аргументы
- Почему именно по name сортируем, с названия метода не понятно, даже если метод смотреть непонятно?
| { | ||
| 200-> | ||
| { | ||
| var a=message.body<List<Card>>() |
Collaborator
Author
There was a problem hiding this comment.
называй одинаковые модели которые гуляют по хттп одинаково, что на бэке то и на фронте
Comment on lines
+40
to
+44
| 401-> | ||
| { | ||
| return hashMapOf() | ||
| } | ||
| else ->{ |
| suspend fun clientCheck(token: Token) | ||
| { | ||
| client.get("http://192.168.0.101:8888/hello"){ | ||
| client.get("http://192.168.0.10:8888/hello"){ |
|
|
||
|
|
||
| /** | ||
| * A simple [Fragment] subclass. |
Collaborator
Author
There was a problem hiding this comment.
комменты наверное можно убрать?
| @@ -65,7 +65,7 @@ class SignUpFragment : Fragment() { | |||
| ):Boolean | |||
| { | |||
| val usver=UserRegister(email,password,name, date,telegramId) | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.